package com.gw.vip.server.service.dao_service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gw.vip.server.bo.TransAccSumBo;
import com.gw.vip.server.dao.TmpTransMapper;
import com.gw.vip.server.po.TmpTrans;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

/**
 * @author GW
 * @description
 * @since 2022-05-07
 */
@Service
@Slf4j
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class TmpTransService extends ServiceImpl<TmpTransMapper, TmpTrans> {

    public void truncate() {
        this.baseMapper.truncate();
    }

    public Integer initData(LocalDate clearDate) {
        return this.baseMapper.initData(clearDate);
    }

    public void initDataFromHis(LocalDate clearDate) {
        this.baseMapper.initDataFromHis(clearDate);
    }

    public BigDecimal getDiffAmtByAccount(String accountId, LocalDate clearDate) {
        return this.baseMapper.getDiffAmtByAccount(accountId, clearDate);
    }

    public List<TransAccSumBo> transSum(LocalDate clearDate) {
        return this.baseMapper.transSum(clearDate);
    }

    public List<TmpTrans> listByClearDate(LocalDate clearDate) {
        return this.baseMapper.listByClearDate(clearDate);
    }
}
